package cn.webrx.coll;/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */

import java.util.ArrayList;
import java.util.List;

/**
 * <p>Project: jse2204 - cn.webrx.coll.ArrayList2
 * <p>Powered by webrx On 2022-09-16 17:58:18
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class ArrayList2 {
    public static void main(String[] args) {
        //使用泛型，java的基本类型不支持泛型
        List<String> list = new ArrayList<>();
        List<Integer> li = new ArrayList<>();
        list.add("hello");

        for(String s : list){
            System.out.println(s);
        }

        List<Integer> aa = new ArrayList<>();
        aa.add(6);
    }
}
